<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>单据详情</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link href="../../dep/mui/css/mui.css" rel="stylesheet" />
		<link href="../../css/style.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/page/purchase/purchaseDetail.css" />
	</head>

	<body>
		<header id="header" class="mui-bar mui-bar-nav header-lay">
			<h1 class="mui-title">单据详情</h1>
			<button class="mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
		    	<span class="mui-icon mui-icon-left-nav"></span>返回</button>
			<a href="#forMore"><button class="mui-btn mui-btn-blue mui-btn-link mui-pull-right">更多</button></a>
		</header>

		<div class="tab-fixed">
			<div id="segmentedControl" class="mui-segmented-control">
				<a class="mui-control-item mui-active" href="#item1">
					单据详情
				</a>
				<a class="mui-control-item" href="#item2">
					货品明细
				</a>
				<a class="mui-control-item" href="#item3">
					审批历史
				</a>
			</div>
		</div>
		<div class="tab-fixed-layer"></div>
		<div class="mui-content">

			<div>
				<div id="item1" class="mui-control-content mui-active">
					<ul class="mui-table-view fixedul">
						<li id="statusName" class="mui-table-view-cell list-color1">

						</li>
						<li id="serialNo" class="mui-table-view-cell list-color1">

						</li>
						<li class="mui-table-view-cell">
							单据日期：<span id="serialDate"></span>
						</li>
						<li class="mui-table-view-cell">
							预交日期：<span id="deliveryDate"></span>
						</li>
						<li class="mui-table-view-cell">
							供应商：<span id="companyName"></span>
						</li>
						<li class="mui-table-view-cell">
							业务员：<span id="busUserName"></span>
						</li>
						<li class="mui-table-view-cell">
							计税方式: <span id="taxRateType"></span>
						</li>
						<li class="mui-table-view-cell">
							整单金额：<span id="totalAmount"></span>
						</li>
						<li class="mui-table-view-cell">
							创建人：<span id="operatorName"></span>
						</li>
						<li class="mui-table-view-cell">
							创建时间：<span id="dataCreated"></span>
						</li>
						<li class="mui-table-view-cell">
							备注：
							<p>
								<textarea id="notes" rows="5" placeholder="多行文本框"></textarea>
							</p>
						</li>
					</ul>

				</div>
				<div id="item2" class="mui-control-content">
					<ul id="listPurchaseUl" class="mui-table-view mui-table-view-chevron">

					</ul>

				</div>
				<div id="item3" class="mui-control-content">

					<ul id="historyList" class="mui-table-view mui-grid-view">

					</ul>

				</div>
			</div>

		</div>

		<!--<div class="fixeddiv">
			<button type="button" class="mui-btn mui-btn-primary mui-btn-block btn-color1">生成采购入库单</button>
			<button type="button" class="mui-btn mui-btn-primary mui-btn-block btn-color2">查看已生成采购入库单</button>
		</div>-->
		<div class="fixeddiv1 hide" id="sellFixeddiv">
			<button type="button" id="creatSellOut" class="hide mui-btn mui-btn-primary mui-btn-block btn-color1">生成采购入库单</button>
			<button type="button" id="querySellOut" class="hide mui-btn mui-btn-primary mui-btn-block btn-color2">查看已生成采购入库单</button>
		</div>
		<div id="forMore" class="mui-popover mui-popover-action mui-popover-bottom">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="javascript:;">重置草稿</a>
				</li>
			</ul>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="#forward"><b>取消</b></a>
				</li>
			</ul>
		</div>

		<div id="editForMore" class="mui-popover mui-popover-action mui-popover-bottom">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="../newBuy/newBuy.html">编辑</a>
				</li>
				<li class="mui-table-view-cell">
					<a href="javascript:;">删除</a>
				</li>
			</ul>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="#forward"><b>取消</b></a>
				</li>
			</ul>
		</div>

		<div id="eForMore" class="mui-popover mui-popover-action mui-popover-bottom">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="javascript:;">通过</a>
				</li>
				<li class="mui-table-view-cell">
					<a href="javascript:;">驳回</a>
				</li>
			</ul>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="#forward"><b>取消</b></a>
				</li>
			</ul>
		</div>

		<script type="text/html" id="pirchaseDetList">
			{{each list as items index}}
			<li class="mui-table-view-cell mui-collapse">
				<a class="mui-navigate-right" href="#">
					{{if index
					< 9 }} <div class="mui-col-xs-2 listitem">0{{index + 1}}</div>
						{{else}}
						<div class="mui-col-xs-2 listitem">{{index + 1}}</div>
						{{/if}}
						<div class="mui-col-xs-5 listitem">{{items.goodsName}}-{{items.specValue}}</div>
						<div class="mui-col-xs-5 listitem"></div>
				</a>
				<ul class="mui-table-view mui-table-view-chevron add-padding">
					<li class="mui-table-view-cell">{{items.goodsSerial}}
					</li>
					<li class="mui-table-view-cell">{{items.goodsName}}-{{items.specValue}}
					</li>
					<li class="mui-table-view-cell">仓库：<span>{{items.whId}}</span>
					</li>
					<li class="mui-table-view-cell">{{items.price}}(元)×{{items.unitCodeNumber}}({{items.unitCode}})
					</li>
					<li class="mui-table-view-cell">金额：{{items.amount}}
					</li>
					<li class="mui-table-view-cell">税率：{{items.taxRate}}
					</li>
					<li class="mui-table-view-cell">税金：{{items.baseAmountTax}}
					</li>
					<li class="mui-table-view-cell">含税金额：{{items.baseAmountIncludeTax}}
					</li>
					<li class="mui-table-view-cell">未税金额：{{items.baseAmountNoIncludeTax}}
					</li>
					<li class="mui-table-view-cell">折扣率：{{items.discount}}
					</li>
					<li class="mui-table-view-cell">折扣额：{{items.discountAmount}}
					</li>
					<li class="mui-table-view-cell">折后金额：{{items.amount - items.discountAmount}}
					</li>
					<li class="mui-table-view-cell">已入库量：{{items.inputNumber}}
					</li>
					<li class="mui-table-view-cell" style="padding-right: 25px;">备注：<label>{{items.notes}}</label>
					</li>
				</ul>
			</li>
			{{/each}}
		</script>
	</body>

</html>
<script src="../../dep/seajs/3.0.0/sea.js"></script>
<script src="../../js/seajs_config.js"></script>
<script>
	seajs.use("../../js/purchase/purchaseDetail");
</script>
<script type="text/html" id="sHistoryList">
	{{each list as items index}}
	<li class="mui-table-view-cell mui-media mui-col-xs-12">
		<div class="laydiv1">{{items.auditUserName}}</div>
		<div class="laydiv2">
			<div class="laydiv2-con">
				{{if items.auditStatusId == 4 }}
				<span class="mui-badge mui-badge-color4 laydiv2-ico">{{items.auditResult}}</span> {{else if items.auditStatusId == 5}}
				<span class="mui-badge mui-badge-color1 laydiv2-ico">通过</span> {{/if}}
				<div class="laydiv2-tipcon">
					<div class="popup">
						<span><em></em></span>
						<p>{{items.auditDateTime}}</p>
						<p class="span-black">{{items.auditNote}}</p>
					</div>
				</div>
			</div>
		</div>
	</li>
	{{/each}}
</script>